import request from "@/router/axios";

export const getList = (current, size, params) => {
  return request({
    url: "/api/server-shop/admin/order/refund/page",
    method: "get",
    params: {
      ...params,
      current,
      size,
    },
  });
};

export const getDetail = (id) => {
  return request({
    url: "/api/server-shop/admin/order/refund/info",
    method: "get",
    params: {
      id,
    },
  });
};

export const refundReject = (data) => {
  return request({
    url: "/api/server-shop/admin/order/refund/reject",
    method: "post",
    data,
  });
};

export const refundApplyAgree = (data) => {
  return request({
    url: "/api/server-shop/admin/order/refund/apply/agree",
    method: "post",
    data,
  });
};

export const refundShippingAgree = (data) => {
  return request({
    url: "/api/server-shop/admin/order/refund/shipping/agree",
    method: "post",
    data,
  });
};

export const orderRefundPay = (data) => {
  return request({
    url: "/api/server-shop/admin/order/refund/pay",
    method: "post",
    data,
  });
};
